<template>
  <el-menu 
    unique-opened
    router
    background-color="#545c64"
    text-color="#fff"
    class="cus-el-menu cus-scrollbar"
    :default-active="$route.meta.activeMenu">
    <template v-for="router in props.menus">
      <menu-item :router="router"></menu-item>
    </template>
  </el-menu>
</template>

<script setup>
  
  import menuItem from './menuItem.vue'
  
  import {
    defineProps
  } from 'vue'
  
  import {
    useRouter
  } from 'vue-router'
  
  const router = useRouter();
  
  const props = defineProps({
    menus: Array
  })
  
</script>

<style lang="scss" scoped>
  
  .cus-el-menu {
    width: 210px;
    height: 100%;
    border: none;
  }
</style>
